package com.brush.pig.domain.req.safety;

import cn.hutool.core.util.StrUtil;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.brush.common.core.domain.page.PageAbstructReq;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;

@Getter
@Setter
@ApiModel(value = "IotDormSterilizeReq",description = "猪猪消毒参数")
public class IotDormSterilizeReq extends PageAbstructReq {

    /**
     * 主键
     */
    @ApiModelProperty(value = "主键")
    private Long id;

    /**
     * 消毒类型（数据字典）
     */
    @ApiModelProperty(value = "消毒类型（数据字典）")
    private String type;

    /**
     * 原因
     */
    @ApiModelProperty(value = "原因")
    private String reason;

    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private Long createdBy;


    @Override
    public String getOrderBy() {
        if (StrUtil.isNotBlank(super.getOrderByColumn())){
            return super.getOrderByColumn() + " " + super.getIsAsc();
        }
        return null;
    }
}
